package com.asianrapid.service.impl.sys;

import com.asianrapid.dao.FurnitrunDao;
import com.asianrapid.model.sys.FurnitrunEntity;
import com.asianrapid.model.sys.FurnitrunLinkEntity;
import com.asianrapid.model.sys.OptionEntity;
import com.asianrapid.service.sys.FurnitrunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("FurnitrunServiceImpl")
public  class FurnitrunServiceImpl implements FurnitrunService{

    @Autowired
    private FurnitrunDao furnitrunDao;
    @Override
    public List<FurnitrunLinkEntity> furnitrunList(int pageSize, int start) {
        int state = 0;
        return furnitrunDao.furnitrunList( pageSize, start, state);
    }

   @Override
    public List<OptionEntity> tableList() {
        int state = 0;
        return furnitrunDao.tableList(state);
    }





    @Override
    public int furnitrunSize( int pageSize, int start) {
        int state = 0;
        return furnitrunDao.furnitrunSize( pageSize, start, state);
    }


   @Override
    public void insertFurnitrun(FurnitrunEntity furnitrunEntity) {
        furnitrunEntity.setState(0);
        furnitrunDao.insertFurnitrun(furnitrunEntity);
    }


    @Override
    public void updateFurnitrun(FurnitrunEntity furnitrunEntity) {

        furnitrunDao.updateFurnitrun(furnitrunEntity);
    }


    @Override
    public void deleteFurnitrun(List<String> groupId) {

        furnitrunDao.deleteFurnitrun(groupId);
    }

    @Override
    public FurnitrunEntity getFurnitrun(Integer groupId) {


        return furnitrunDao.getFurnitrun(groupId);
    }
}
